<script>
		$(document).ready(function(){
			$("#form_object_create").validate();
			$("#form_object_create #submit").click(function() {
				if($("#form_object_create").valid())
				{
		
					IMC.create(manualuploader);
				}
			});
		});
		var manualuploader = null;
</script>

<form id="form_object_create"
	method="post" accept-charset="utf-8" action="#">
	<label>Title</label><input type="text" id="title" name="title" value=""
		class="required" /> <label>Description</label>
	<textarea id="description" name="description" class="required"></textarea>
	<br />
	<?php 
	if(is_numeric($uid))
	{
		echo '<div id="fine-uploader"></div>';
		echo '
					<script>
					//initialize the fineuploader plugin
					manualuploader = init_uploader();
					</script>';
	}
	else
	{
		echo 'You must be logged in to upload image';
	}
	?>
	<br />
	<div class="clearfix"></div>
	<!-- temp bug to be fixed -->
	<label class="checkbox"><input type="checkbox" id="terms" name="terms"
		value="agree" class="required"> I agree with the <a
		href="/adon/pages/view_part/terms" data-target="#myModal"
		data-toggle="modal">terms of use</a> </label>
	<button type="submit" id="submit" class="btn btn-primary submit"
		onclick="return false;">Save changes</button>
	<button type="button" class="btn"
		onclick="IMC.cancel_create(); switchInterface('content');">Cancel</button>
</form>

<div id="alert_area"></div>
